SuperStrict

Framework BRL.StandardIO

Import Otus.Lexer

Local syntax:String[] = ["\pL+", "\s+", "~q[^~q]*~q"]
Local l:TLexer = TLexer.Create(syntax, "lex")
Local s:TStream

Print "ReadLine"
s = TLexerStream.Create(ReadStream("test.txt"), l)
While Not s.Eof()
	Print "<<"+s.ReadLine()+">>"
Wend
Print

Print "ReadInt"
s = ReadStream("lex::test.txt")
While Not s.Eof()
	Print s.ReadInt()
Wend
Print


Print "ReadObject"
s = ReadStream("lex::test.txt")
While Not s.Eof()
	Print "<<"+s.ReadObject().ToString()+">>"
Wend
